<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateYaoDivinationTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('yao_divination', function (Blueprint $table) {
            $table->id();
            $table->unsignedInteger('divination_id')->index();
            $table->unsignedInteger('by_dividend_id')->index();
            //$table->unsignedInteger('category_id')->index();
            $table->integer('yao_count')->default(0)->comment('变爻数');
           // $table->text('content')->nullable()->comment('详细解析');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('yao_divination');
    }
}
